package com.xiaoyang.lotterysystem.service;

import com.xiaoyang.lotterysystem.controller.param.DrawPrizeParam;
import com.xiaoyang.lotterysystem.controller.param.WinningRecordParam;
import com.xiaoyang.lotterysystem.dao.dataobject.WinningRecordDO;
import com.xiaoyang.lotterysystem.service.dto.WinningRecordDTO;

import java.util.List;

public interface DrawPrizeService {

    /**
     * 异步抽奖
     * @param param
     */
    void drawPrize(DrawPrizeParam param);


    /**
     * 校验抽奖请求是否有效
     * @param param
     */
    Boolean checkDrawPrizeParam(DrawPrizeParam param);

    /**
     * 保存中奖着名单
     *
     * @param param
     * @return
     */
    List<WinningRecordDO> saveWinnerRecords(DrawPrizeParam param);

    /**
     * 删除活动/奖品下的中奖记录
     * @param activityId
     * @param prizeId
     */
    void deleteRecords(Long activityId, Long prizeId);

    /**
     * 获取中奖记录
     * @param param
     * @return
     */
    List<WinningRecordDTO> getRecords(WinningRecordParam param);
}
